export const recombinationNavList = (router, home) => {
    const A01 = router.filter(v => v.key !== home)
    A01.splice(Math.ceil(A01.length / 2), 0, { key: 'occupation' })
    return A01
}


export const getSiblingsByKey = (data, targetKey) => {
    for (const node of data) {
        if (node.children) {
            if (node.children.some(child => child.key === targetKey)) {
                return { key: node.key, child: node.children }
            }
        }
    }
    return { child: [] }
}